class Human {
  constructor(gender) {
    this.gender = gender;
  }

  heihei = "嘿嘿";
  //   实例方法
  sayGender() {
    console.log(`俺是一个${this.gender}人`);
  }
  //   静态方法
  static eat() {
    console.log("cicicici");
  }
  //   静态属性写法 2
  static staticPropNum = 22222;
}

Human.eat();
Human.staticProp = "静态属性";
console.log(Human.staticProp); // 静态属性
console.log(Human.staticPropNum); // 22222
console.log(Human.heihei); // undefined
// Human.sayGender(); // 报错 TypeError: Human.sayGender is not a function
console.log("=============动静分割线============");
const boy = new Human("男"); // 女娲根据模板造人 哈哈
boy.sayGender();
console.log(boy.staticProp); // undefined
console.log(boy.staticPropNum); // undefined
console.log(boy.heihei); // 嘿嘿
boy.Human(); // 报错 静态方法不会被实例继承 TypeError: boy.Human is not a function
